//
//  DDNavigationController.m
//  LYJR_XDD
//
//  Created by 肖棟棟 on 16/8/6.
//  Copyright © 2016年 肖棟棟. All rights reserved.
//

#import "DDNavigationController.h"
#import "DDLoginViewController.h"

@interface DDNavigationController ()

@end

@implementation DDNavigationController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
//    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"Group 51"] style:UIBarButtonItemStylePlain target:self action:@selector(backBtnDidClick)];
}

-(void)backBtnDidClick{

    [self.navigationController popViewControllerAnimated:YES];
}


+ (void)initialize
{
    if (self == [DDNavigationController class]) {
        //        //设置导航条的属性
        UINavigationBar * navBar=[UINavigationBar appearance];
//        navBar.backgroundColor = [UIColor colorWithHexColor:@"#0D1324"];
        //设置字体
        //        [navBar setTitleTextAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:15],NSForegroundColorAttributeName:[UIColor cyanColor]}];
        //设置返回按钮的颜色(默认是蓝色)
//        navBar.tintColor=[UIColor orangeColor];
        
        // 设置导航条标题颜色
        NSMutableDictionary *attributes = [NSMutableDictionary dictionary];
        attributes[NSFontAttributeName] = [UIFont systemFontOfSize:18];
        attributes[NSForegroundColorAttributeName] = [UIColor colorWithHexColor:@"#A7ABB4"];
        [navBar setTitleTextAttributes:attributes];
        
        // 导航栏背景颜色
        navBar.barTintColor = [UIColor colorWithHexColor:@"#0D1324"];
 
    }
}



//- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated {
//    NSLog(@"%@",viewController);
//    viewController.hidesBottomBarWhenPushed = YES;
//    [super pushViewController:viewController animated:animated];
////    viewController.hidesBottomBarWhenPushed = NO;
////
////    if ([viewController isKindOfClass:[DDLoginViewController class]]){
////        DDLoginViewController * logVc = (DDLoginViewController *)viewController;
////        
////        logVc.hidesBottomBarWhenPushed = YES;
////    }
//    
//}

//-(UIViewController *)popViewControllerAnimated:(BOOL)animated{
//    
//    self.hidesBottomBarWhenPushed = NO;
//    return [super popViewControllerAnimated:animated];
//}




@end
